package com.ruoyi.vehicle.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.vehicle.mapper.RouteStationRealtionMapper;
import com.ruoyi.vehicle.domain.RouteStationRealtion;
import com.ruoyi.vehicle.service.IRouteStationRealtionService;

/**
 * 站点关联Service业务层处理
 * 
 * @author yyj
 * @date 2025-08-16
 */
@Service
public class RouteStationRealtionServiceImpl implements IRouteStationRealtionService 
{
    @Autowired
    private RouteStationRealtionMapper routeStationRealtionMapper;

    /**
     * 查询站点关联
     * 
     * @param realtionId 站点关联主键
     * @return 站点关联
     */
    @Override
    public RouteStationRealtion selectRouteStationRealtionByRealtionId(Long realtionId)
    {
        return routeStationRealtionMapper.selectRouteStationRealtionByRealtionId(realtionId);
    }

    /**
     * 查询站点关联列表
     * 
     * @param routeStationRealtion 站点关联
     * @return 站点关联
     */
    @Override
    public List<RouteStationRealtion> selectRouteStationRealtionList(RouteStationRealtion routeStationRealtion)
    {
        return routeStationRealtionMapper.selectRouteStationRealtionList(routeStationRealtion);
    }

    /**
     * 新增站点关联
     * 
     * @param routeStationRealtion 站点关联
     * @return 结果
     */
    @Override
    public int insertRouteStationRealtion(RouteStationRealtion routeStationRealtion)
    {
        routeStationRealtion.setCreateTime(DateUtils.getNowDate());
        return routeStationRealtionMapper.insertRouteStationRealtion(routeStationRealtion);
    }

    /**
     * 修改站点关联
     * 
     * @param routeStationRealtion 站点关联
     * @return 结果
     */
    @Override
    public int updateRouteStationRealtion(RouteStationRealtion routeStationRealtion)
    {
        routeStationRealtion.setUpdateTime(DateUtils.getNowDate());
        return routeStationRealtionMapper.updateRouteStationRealtion(routeStationRealtion);
    }

    /**
     * 批量删除站点关联
     * 
     * @param realtionIds 需要删除的站点关联主键
     * @return 结果
     */
    @Override
    public int deleteRouteStationRealtionByRealtionIds(Long[] realtionIds)
    {
        return routeStationRealtionMapper.deleteRouteStationRealtionByRealtionIds(realtionIds);
    }

    /**
     * 删除站点关联信息
     * 
     * @param realtionId 站点关联主键
     * @return 结果
     */
    @Override
    public int deleteRouteStationRealtionByRealtionId(Long realtionId)
    {
        return routeStationRealtionMapper.deleteRouteStationRealtionByRealtionId(realtionId);
    }
}
